import { createApp } from 'vue'
import App from './App.vue'
import website from '@/config/website'
import axios from '@/config/axios';
import store from '@/config/store';
import router from '@/config/router/';
import '@/config/router/permission';
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import Avue from '@smallwei/avue';
import '@smallwei/avue/lib/index.css';
import AvueFormDesign from 'avue-form-design'


import basicContainer from 'components/basic-container/main.vue'
import basicBlock from 'components/basic-block/main.vue'
import baseIcon from '@/components/base-icon/index.vue'
import fileExplorer from '@/components/wpan/FileExplorer/index.js'

import { getScreen } from './utils/util'
import error from './error';
import dayjs from 'dayjs'
import 'animate.css'
import 'styles/common.scss';


window.axios = axios;
const app = createApp(App)

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
app.component('basicContainer', basicContainer)
app.component('basicBlock', basicBlock)
app.component('baseIcon',baseIcon)
app.config.globalProperties.$dayjs = dayjs
app.config.globalProperties.website = website
app.config.globalProperties.getScreen = getScreen

app.use(fileExplorer)
app.use(error)
app.use(store)
app.use(router)
app.use(ElementPlus,{locale:zhCn})
app.use(Avue, {axios})
app.use(AvueFormDesign)
app.mount('#app')
